# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=lorsrf
pkgver=v2.1.r3.g5c69453
pkgrel=1
epoch=1
pkgdesc='Find the parameters that can be used to find SSRF or Out-of-band resource load.'
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner' 'blackarch-fuzzer')
arch=('x86_64' 'aarch64')
url='https://github.com/knassar702/lorsrf'
license=('custom:unknown')
makedepends=('git' 'cargo')
source=("git+https://github.com/knassar702/$pkgname.git")
options=(!strip)
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $pkgname

  cargo build --release
}

package() {
  cd $pkgname

  install -Dm 755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/" parameters.txt
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md
}

